#include "includes/processor.h"

#include "includes/state_machine.h"
#include "includes/mod_dance.h"
#include "includes/mod_flicker.h"
#include "includes/mod_idle.h"
#include "includes/mod_init.h"

#include "includes/led.h"
#include <stdio.h>

void check_sensors();

void main(void){
	sm_set_state(S_INIT);
	sm_lock();

   	do_init();
   	
     while(1){
    	/*if( !sm_is_locked() )
        	check_sensors(); //sets state machine
        
        if( sm_is_state(S_IDLE) )
        	do_idle();
       	else if( sm_is_state(S_FLICKERING) )
            do_flicker();
        else if( sm_is_state(S_DANCE) )
            do_dance();*/
     }
}

//changes state if needed
void check_sensors(){
	
}
